package com.gjy.spring;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-01-23 17:16:02
 */
@Component
public class SpringAppCommandLineRunner implements CommandLineRunner {
    private static final Logger log = LoggerFactory.getLogger(SpringAppCommandLineRunner.class);

    @Override
    public void run(String... args) throws Exception {
        log.info("控制台参数: {}", Arrays.stream(args).collect(Collectors.toList()));
    }
}
